require "aio"

port = "/dev/ttyUSB0"
led = 13

puts "Press Control+C to cancel..."

Aio::Board.new(port) do |board|
	sleep 0.1 until board.ready?
	
	board.pinMode(led, Aio::OUTPUT)
	
	loop do
		board.digitalWrite(led, Aio::HIGH)
		sleep 0.5
		board.digitalWrite(led, Aio::LOW)
		sleep 0.5
	end
end
